import type { GoogleElements } from '../../../../../../../../types/constants/personalization/google'
import {
  ThemeVarService,
} from '../../../../../../../../lib/abstract/style/theme_var/service'
import { PAGE_ELEMENTS, SUPPORTED_PLATFORMS } from '../../../../../../../../types/constants'

export class GoogleNotFoundPage {
  elements: GoogleElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GOOGLE]
  private static instance: GoogleNotFoundPage
  protected readonly themeVarService: ThemeVarService = ThemeVarService.getInstance()

  /**
   * 获取单例实例
   */
  public static getInstance(): GoogleNotFoundPage {
    if (!GoogleNotFoundPage.instance) {
      GoogleNotFoundPage.instance = new GoogleNotFoundPage()
    }
    return GoogleNotFoundPage.instance
  }

  init(): void {
  }

  getMainStyles(): string {
    return `
  display: flex !important;
  justify-content: center !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 100% !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  background-position-x: center !important;
  
  p {
    color: var(${this.themeVarService.search.default.text}) !important;
    
    ins {
      color: var(${this.themeVarService.search.default.text}) !important;
    }
  }
    `
  }
}
